Skip to content

External storage#221

Open
J0J0 wants to merge 5 commits intoflackbash:masterfrom
J0J0:external-storage
Open

External storage#221
J0J0 wants to merge 5 commits intoflackbash:masterfrom
J0J0:external-storage

Conversation

@J0J0
Copy link
Copy Markdown
Contributor

@J0J0 J0J0 commented Mar 21, 2026

This PR brings back support for (finding) files on external storage on Android 11 and later.

(Disclaimer: i'm more of an Android dabbler and though i tried my best at reading up on stuff as necessary, it is entirely possible that i missed something important.)

The commit names should be pretty self explanatory, and you can see all of the new features in the following

Android 15 (emulator) screen recording.
external-storage.mp4

(Not terribly important, but in the video, emulated/0 was listed as a single item under /storage. That differs from the current PR's version, where it is properly split into emulated followed by 0.)

In principle, the commits for the initial path preference are orthogonal to the /storage discovery commit. And both of the latter seem to be orthogonal to the MANAGE_EXTERNAL_STORAGE permission.

From a user's perspective, the changes should be entirely backwards compatible.

(My Android Studio needed to upgrade its gradle plugin or whatever, which is mostly Android development black magic to me, but i suspect the corresponding changes to tracked files should not be included in this PR ...(?))

Should fix #111.

@J0J0
Copy link
Copy Markdown
Contributor Author

J0J0 commented Mar 21, 2026

The permission thing might be the most controversial contribution, because i don't really know whether there's any benefit. More explicitly:

  1. I thought, the permission might help to gain discoverablity of and/or read access to external storage, but in my experiments so far, i could access all the audio files i wanted without it. 🤷🏻‍♂️
  2. Also, on recent Android versions (probably > 13), the app does not receive MANAGE_EXTERNAL_STORAGE capabilites, even if the user explicitly granted it in the system settings. As far as i understand the Protection level: signature|appop|preinstalled bit, the permission can basically only be wielded by preinstalled apps – more or less what was previously known as "system apps".
  3. I even hadn't any luck obtaining the permission for the app on an Android 11 emulator device, even though it supposedly should be possible, exactly following the official guide. I suspect that this is due to compileSdk = 36 (irrespective of the targetSdk, which i tried to lower to 30 for the test).

So MANAGE_EXTERNAL_STORAGE only seems to be of use if someone is willing to bake AudioAnchor into their custom ROM or make it a system app by other means ... or if someone wants to mainain a build flavor of the app with 30 ≤ targetSdk ≤ 33 and probably compileSdk low enough, dunno (see 3.).

However, as long as the app stays clear of the Play Store, keeping the mere option to request "All files access" doesn't hurt either, so i opted for keeping it in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cant select external/sdcard storage

1 participant